<?php
/**
 * 报价单验证器
 */

namespace app\common\validate;

class OfferValidate extends CommonBaseValidate
{
    protected $rule = [
            'school_id|学校' => 'require',
    'name|名称' => 'require',
    'money|总金额' => 'require',
    'status|状态' => 'require',

    ];

    protected $message = [
            'school_id.required' => '学校不能为空',
    'name.required' => '名称不能为空',
    'money.required' => '总金额不能为空',
    'status.required' => '状态不能为空',

    ];

    protected $scene = [
        'admin_add'     => ['school_id', 'name', 'money', 'status', ],
        'admin_edit'    => ['id', 'school_id', 'name', 'money', 'status', ],
        'admin_del'     => ['id', ],
        'admin_disable' => ['id', ],
        'admin_enable'  => ['id', ],
        'api_add'       => ['school_id', 'name', 'money', 'status', ],
        'api_info'      => ['id', ],
        'api_edit'      => ['id', 'school_id', 'name', 'money', 'status', ],
        'api_del'       => ['id', ],
        'api_disable'   => ['id', ],
        'api_enable'    => ['id', ],
    ];
}
